﻿@model RB2012.Models.Contact
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "Ryan Butler.org : Contact";
}
<script type="text/javascript" src="@Url.Content("~/scripts/spin.js")"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/focus.js")"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/loading.js")"></script>
<h1>contact</h1>
<p class="contactme">ryan (at) ryanbutler.org</p>
<div id="noprint">
<div id="loading">
<div id="loadingcontent">
<p id="loadingspinner">
Processing...
</p>
</div>
</div>
<p>All fields are required</p>
@using (Html.BeginForm())
{ 
    @Html.ValidationSummary(true)
    <div class="row">
    @Html.LabelFor(model => model.FirstName, "First Name:")
    @Html.EditorFor(model => model.FirstName)
    @Html.ValidationMessageFor(model => model.FirstName)
    </div>
    <div class="row">
    @Html.LabelFor(model => model.LastName, "Last Name:")
    @Html.EditorFor(model => model.LastName)
    @Html.ValidationMessageFor(model => model.LastName)
    </div>
    <div class="row">
    @Html.LabelFor(model => model.Email, "Email:")
    @Html.EditorFor(model => model.Email)
    @Html.ValidationMessageFor(model => model.Email)
    </div>
    <div id="nomobile">
    <div class="row">
    <label>Tutorial Question?</label>
    @Html.RadioButtonFor(model => model.Tutorial, true)Yes
    @Html.RadioButtonFor(model => model.Tutorial, false)No
    </div>
    </div>
    if (Convert.ToBoolean(Model.Tutorial))
    {
        <div class="row" id="tutorial_post">
        <label>Which tutorial?</label>
        @Html.DropDownList("TutorialID", (IEnumerable<SelectListItem>)ViewBag.Tutorials, "--select one--")
        @Html.ValidationMessageFor(model => model.TutorialID)
        </div>
    }
    else
    { 
        <div class="row" id="tutorial_hide">
        <label>Which tutorial?</label>
        @Html.DropDownList("TutorialID", (IEnumerable<SelectListItem>)ViewBag.Tutorials, "--select one--")
        </div>  
    }
    <div class="row">
    @Html.LabelFor(model => model.Comment, "Comments:")
    @Html.TextAreaFor(model => model.Comment)
    @Html.ValidationMessageFor(model => model.Comment)
    </div>
    <div class="row">
    <div id="button">
    <input id="submitbtn" type="submit" value="Send"/>
    <input type="reset" value="Reset" />
    </div>
    </div>
}
</div>